﻿using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinApp.i18n;
using WinApp.Model.AjaxResult;
using WinApp.Until;
using WinApp.ViewModel;

namespace WinApp.View
{
    public partial class Home : UIPage
    {
        public WinApp _parent { get; set; }
        public Home()
        {
            InitializeComponent();
            //_parent = parent;
            this.Text = Language.GetLang("home");
            lbTWelcome.Text = Language.GetLang("welcome");
            lbTFistName.Text = Language.GetLang("firstName");
            lbTLastName.Text = Language.GetLang("lastName");
            lbTPhone.Text = Language.GetLang("phone");
            lbTEmail.Text = Language.GetLang("email");

        }

        private void Home_Load(object sender, EventArgs e)
        {
            lbLoginID.Text = GlobalVariables.UserInfo.UserName;
            lbFirst.Text = GlobalVariables.UserInfo.FirstName;
            lbLast.Text = GlobalVariables.UserInfo.LastName;
            lbEmail.Text = GlobalVariables.UserInfo.Email;
            lbPhone.Text = GlobalVariables.UserInfo.PhoneNumber;
            //string.IsNullOrEmpty(GlobalVariables.UserInfo.PhoneNumber == null) ? "" : GlobalVariables.UserInfo.PhoneNumber;
            uiAvatar1.Image = GlobalVariables.UserInfo.HeadImage;



            //ShowSuccessDialog("正确信息提示框");
            //ShowErrorDialog("错误信息提示框");
        }
    }
}
